// Header guard
#ifndef REQUEST_H
#define REQUEST_H
#include <pthread.h>

class request {
	private:
		// Which disk track the I/O request will occur on
		int trackNum;
		
		// The number of blocks the I/O request requires
		int workSize;
		
		// The thread ID of the requesting thread
		int requestingTid;
		
		// The output generated from the I/O request
		//private var outputData;
		
	public:
		// Constructor: creates a request object.
		// Initializes trackNum, workSize, and requesting thread ID
		request(int trackNum, int workSize, int requestingTid);
		~request();
		
		// Set a new disk track number
		bool setTrackNum (int newTrackNum);
		
		// Returns the current disk track number
		int getTrackNum ();
		
		// Set a new work size
		bool setWorkSize (int newWorkSize);
		
		// Returns current work size
		int getWorkSize ();
		
		// Returns the thread ID of the requesting thread
		int getRequestingTid();
		
		/*
		 Condition variable to allow worker to signal the requesting
		 client. The client will submit a request and wait on this
		 condition variable to tell it when the I/O work has been
		 completed with respect to the requested work. 
		*/
		pthread_cond_t CVWorkComplete;
};

// End guard
#endif
